package cn.kgm.user.dto.dto;

import cn.kgm.core.entity.Entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.SuperBuilder;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * # 技术改变自己 #
 * 用户密码锁定表
 * @author kappi
 * @date   2024-04-08 13:28:48
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "UserPassLockSaveDTO", description = "用户密码锁定表")
public class UserPassLockSaveDTO extends Entity<Long> {

    /**
     * 用户账号ID:[user_account.id]
     */
    @ApiModelProperty(value = "用户账号ID:[user_account.id]", position = 2)
    @NotNull(message = "用户账号ID:[user_account.id]不能为空")
    private Long accountId;

    /**
     * 密码锁定:[0,未锁定];[1,锁定]
     */
    @ApiModelProperty(value = "密码锁定:[0,未锁定];[1,锁定]", position = 3)
    @NotNull(message = "密码锁定:[0,未锁定];[1,锁定]不能为空")
    private Boolean passLock;

    /**
     * 允许失败次数,到达此次数时执行锁定
     */
    @ApiModelProperty(value = "允许失败次数,到达此次数时执行锁定", position = 4)
    @NotNull(message = "允许失败次数,到达此次数时执行锁定不能为空")
    private Boolean allowedFailNum;

    /**
     * 时间区间,单位分钟
     */
    @ApiModelProperty(value = "时间区间,单位分钟", position = 5)
    @NotNull(message = "时间区间,单位分钟不能为空")
    private Boolean failIntervalTime;

    /**
     * 锁定时间,单位分钟(开始锁定时间+锁定时间=锁定结束时间)
     */
    @ApiModelProperty(value = "锁定时间,单位分钟(开始锁定时间+锁定时间=锁定结束时间)", position = 6)
    @NotNull(message = "锁定时间,单位分钟(开始锁定时间+锁定时间=锁定结束时间)不能为空")
    private Boolean lockTime;

    /**
     * 锁定结束时间
     */
    @ApiModelProperty(value = "锁定结束时间", position = 7)
    @NotNull(message = "锁定结束时间不能为空")
    private LocalDateTime lockEndTime;

}
